<template>
  <div class="content">
    <!-- topBar -->
    <div class="header">
      <span 
      class="back_style"
      @click="goBack"> &lt; </span>
      <div class="title">{{titleName}}</div>
      <div> 

      </div>
    </div>
    <div class="banner">
      <div 
        class="form"
        v-for="(item, index) in formdata"
        :key="index"
      >
        <div>{{item.name}}</div>
        <input
        class="input"
        :placeholder="item.placeholder"
        v-model="item.value" 
        type="text" />
      </div>
    </div>
    <!-- 执照 -->
    <div class="stop">
      <span class="stop_title">营业执照</span>
      <div class="stop_content">
        <!-- 根据数据来渲染 -->
        <div 
          class="stop_info"
          v-for="(item,index) in num"
          :key="index"
        >
          <span>图-{{item}}</span>
        </div>
        <!-- 点击添加数据 -->
        <div 
          class="stop_info"
          @click="addPic"
        >
          <span>图</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'MyPage',
  data() {
    return {
      titleName: '申请合作',
      formdata: [
        {
        name: '公司/品牌',
        placeholder: '请输入公司名称',
        value: '',
        },
        {
          name: '您的姓名',
          placeholder: '请输入您的真是姓名',
          value: '',
        },
        {
          name: '您的岗位',
          placeholder: '请输入您的岗位',
          value: '',
        },
        {
          name: '联系电话',
          placeholder: '请输入联系电话',
          value: '',
        }
      ],
      num: 0
    }
  },
  // props: {

  // },
  created () {
    this.fn()
  },
  methods: {
    fn() {
      console.log('ohh')
    },
    goBack() {
      console.log('back')
    },
    chackText(flag) {
      this.flag = !this.flag
    },
    addPic() {
      // console.log('ohh')
      this.num++
    }
  }

  
}
</script>

<style lang="less" scoped>
.content {
  background: #f1f2f3;
  width: 100vw;
  height: 100vh;
  .header {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    color: #5e5f60;
    background-color: #fff;
    .back_style {
      font-size: 16px;
    }
  }
  .banner  {
    margin-top: 10px;
    padding: 5px;
    background-color: #fff;
    .form{
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 5px 0;
      height: 50px;
      border-bottom: 1px solid #d8d9da;
      .zhanweifu {
        color: #d8d9da;
      }
      .input{ 
        height: 65%;
        width: 55%;
        border: none;
        padding: 3px 15px;
        text-align: right;
      }
    }
  }
  .stop{
    background-color: #fff;
    padding: 5px 10px;
    .stop_title{
      font-size: 16px;
      color: #5e5f60;
    }
    .stop_content {
      // margin-top: 10px;
      border-bottom: 1px solid #d8d9da;
      padding: 10px 0;
      display: flex;
      flex-wrap: wrap;
      .stop_info {
        width: 105px;
        height: 105px;
        margin: 5px;
        border: 1px solid #d8d9da;
        border-radius: 5px;
      }
    }
  }
}
</style>